﻿using _RobotInspection.DTO;
using _RobotInspection.Entities;
using _RobotInspection.Models;
using Microsoft.AspNetCore.Mvc;

namespace _RobotInspection.Interfaces
{
    /// <summary>
    /// 设备管理相关服务层接口类
    /// </summary>
    public interface IEquipmentService 
    {
        /// <summary>
        /// 分页查询设备
        /// </summary>
        /// <param name="queryDto"></param>
        /// <returns></returns>
        Task<ApiResponse<EquipmentPagedResultDto>> GetEquipmentsPagedAsync(EquipmentPagedQueryDto queryDto);

        /// <summary>
        /// 按Id查询设备
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResponse<equipment>> GetEquipmentByIdAsync(long id);

        /// <summary>
        /// 按设备id查询设备资料
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResponse<List<equipment_resource>>> GetEquipmentResourceByEquipmentIdAsync(long id);

        /// <summary>
        /// 按id查询设备资料
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResponse<equipment_resource>> GetEquipmentResourceByIdAsync(long id);

        /// <summary>
        /// 创建设备
        /// </summary>
        /// <param name="equipmentInsertDto"></param>
        /// <returns></returns>
        Task<ApiResponse<object>> InsertEquipmentAsync(EquipmentInsertDto equipmentInsertDto);

        /// <summary>
        /// 创建设备资料
        /// </summary>
        /// <param name="queryDto"></param>
        /// <returns></returns>
        Task<ApiResponse<equipment_resource>> InsertEquipmentResourceAsync(EquipmentResourceDto queryDto);

        /// <summary>
        /// 修改设备
        /// </summary>
        /// <param name="equipmentUpdateDto"></param>
        /// <returns></returns>
        Task<ApiResponse<object>> UpdateEquipmentAsync(EquipmentUpdateDto equipmentUpdateDto);

        /// <summary>
        /// 删除设备
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResponse<equipment?>> DeleteEquipmentAsync(long id);

        /// <summary>
        /// 批量删除设备
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task<ApiResponse<List<string>>> DeleteEquipmentListAsync(List<long> idList);

        /// <summary>
        /// 删除设备资料
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResponse<equipment_resource?>> DeleteEquipmentResourceAsync(long id);
    }
}
